<!---
@自动生成 BY Kupe框架 www.kupebank.com
#date : 2018-03-04 14:01:09
#path : app/template/admin/news.editfield.html
---><!---
@自动生成 BY Kupe框架 www.kupebank.com
#date : 2018-03-04 12:33:11
#path : app/template/admin/news.addfield.html
--->
<form class="layui-form" action="" style="padding:10px;width:450px;">

 <div class="layui-form-item">
    <label class="layui-form-label">字段标识</label>
    <div class="layui-input-block">
      <input type="text" name="field" required  lay-verify="required" placeholder="请输入唯一的字段标识" autocomplete="off" class="layui-input">
    </div>
  </div>


  <div class="layui-form-item">
    <label class="layui-form-label">字段名称</label>
    <div class="layui-input-block">
      <input type="text" name="name" required  lay-verify="required" placeholder="请输入字段名称" autocomplete="off" class="layui-input">
    </div>
  </div>
  

  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">表单模板</label>
    <div class="layui-input-block">
      <textarea name="form" placeholder="请输入表单模板" class="layui-textarea">{:stripslashes($rt['form'])}</textarea>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">在列表显示</label>
    <div class="layui-input-block">
      <input type="checkbox" name="status"  {if $rt['status']}checked{/if} value="1"  lay-skin="switch">
    </div>
  </div>
<div class="layui-form-item">
    <label class="layui-form-label">是否必填</label>
    <div class="layui-input-block">
      <input type="checkbox" name="request"  {if $rt['request']}checked{/if} value="1"  lay-skin="switch">
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">     排序 </label>
    <div class="layui-input-block">
      <input type="text" name="porder" value="1" required  lay-verify="number" placeholder="请输入作者" autocomplete="off" class="layui-input">
    </div>
  </div>



  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
<input type="hidden" name="mid" value="">
<input type="hidden" name="id" value="">
</form>
 
<script>
formSubmit('{_url m="doeditfield"}','formDemo','reload');
</script>


<script>
/*编辑专用*/
$(function(){
	{foreach $rt as $k => $v}
		$("input[name='{$k}'][type='text'],input[name='{$k}'][type='hidden']").val("{$v}");
	{/foreach}	
	//$('[name="tag"]').attr('disabled',true);
	//$("textarea[name='form']").val("{$rt.form}");
	//$("input[name='status']").val("1");
});
</script>